<form action="keyword.manage.php" id="form1" name="form1" method="post">
	<input type="hidden" name="action" value="show_del" />
    <table  class="from_table2_one">
		<thead>
		<tr class="area_ajax_list_title">
		  <th class="pd-left" width="100" class="th1"><tpl> $langKeywordSelect </tpl></th>
   	      <th width="300"><tpl> $langKeywordTransferCode </tpl></th>
		  <th width="300" class="th1"><tpl> $langCOperation </tpl></th>
     	</tr>
		</thead>
		<tpl> if $show_array[0].show_code neq '' </tpl>
		<tpl> section name=loop loop=$show_array </tpl>
		<tr>
		  <td class="pd-left" width="100"><input name="show_code[]" type="checkbox" value="<tpl> $show_array[loop].show_code </tpl>"/></td>
		  <td width="300" align="left"><tpl> $show_array[loop].show_code </tpl></td>
			  <td width="300"><a href="javascript:;" onclick="hideMessage();ajax_modi('<tpl> $show_array[loop].keyword_show_id </tpl>');" class="edit_a_pic" title="<tpl> $langCedit </tpl>">
			    </a> 
		  </td>
  	  </tr><tpl> /section </tpl>
		
		  <tpl> else  </tpl>
		  <tr>
			<td colspan="3"><tpl> $langKeywordNotContent </tpl></td>
		  </tr>
		<tpl> /if </tpl>
</table>
<tpl> if $show_array[0].show_code neq '' </tpl>
<div class="table-5-bottom">
	<div class="p-left">
				<span class="btn_left"><input name="selectall" type="button" id="selectall" value="<tpl> $langKeywordAllSelect </tpl>" class="btn_submit" /></span>
				<span class="btn_left"><input name="negative" type="button" id="negative" value="<tpl> $langKeywordContrarySelect </tpl>" class="btn_submit" /></span>
				<span class="btn_left"><input type="button" id="delbutton" name="delbutton" value="<tpl> $langKeywordDelete </tpl>" class="btn_submit"/></span>
				</div>
				<div style="float:right; padding-right:20px">
				<tpl> $page_list </tpl>		
				</div>
</div>
<tpl> /if </tpl>
</form>

<div id="question" style="display:none; cursor: default; padding:10px"> 
        <b style=" font-size:14px; margin-top:10px; line-height:50px; height:50px;padding-

top:10px; padding-bottom:10px"><tpl> $langKeywordConfirmDelete </tpl></b> <br />
        <input type="button" id="yes" value="<tpl> $langCYes </tpl>"  style=" border:1px solid 

#CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/> 
        <input type="button" id="no" value="<tpl> $langCNo </tpl>"  style="border:1px solid #CCCCCC;width:80px; 

margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/>
		<input type="hidden" id="del_value" />
</div> 


<h1>
  <script>
$(document).ready(function() {

	$('#negative').click(
		function(){
			$('#form1 input[@type=checkbox]').each(function(){
				$(this).attr('checked',!$(this).attr('checked'))
			})
		}
	);
	$('#selectall').click(
		function(){
			$('#form1 input[@type=checkbox]').each(function(){
				$(this).attr('checked',true)
			})
		}
	);

	//删除操作
	var options_del = {
		beforeSubmit:  function(){showLoading(showText);},
		success:       function(msg){
						hideLoading();
						showMessage(msg.message,msg.type);
						if(msg.type == '1'){
							ShowDiv = "result_content";
							getPageContent("keyword.manage.php?action=show");
						}
					},
		type:      'post',
		dataType:  'json'
	};
	
	var question = $('#question')[0];
	$("#delbutton").click(function(){
		$.blockUI(question, { width: '275px' });
	});
	
	$('#yes').click(function() {
			$.unblockUI();
			$('#form1').ajaxSubmit(options_del);	
			return false;
		});
	$('#no').click($.unblockUI);
});

function ajax_modi(str){
	//载入页面
	ShowDiv = "result_content";
	getPageContent("keyword.manage.php?action=show_modi&id="+str);
}

//静态
function ajax_html(){
	$.ajax({
		url: "keyword.manage.php",
		data: "action=make_html",
		type:'post',
		dataType:"json",
		beforeSubmit:  showLoading(showText),   // 提交之前执行的方法
		success: function(msg){
			hideLoading();
			showMessage(msg.message,msg.type);
		}
	});
	return false;
}
</script>
</h1>
